/*
 * 采购/采退单
 *
 */

export const APPROVAL_STA_ENUM: SmartEnum<number> = {
  APPROVAL: {
    value: 1,
    desc: '待审核'
  },
  AUDITED: {
    value: 2,
    desc: '待入库'
  },
  CONFIRM: {
    value: 3,
    desc: '已入库'
  },
  REFUSE: {
    value: 4,
    desc: '拒绝入库'
  }
}

export const APPROVAL_RETURN_ENUM: SmartEnum<number> = {
  APPROVAL: {
    value: 1,
    desc: '待审核'
  },
  AUDITED: {
    value: 2,
    desc: '待出库'
  },
  CONFIRM: {
    value: 3,
    desc: '确认出库'
  },
  REFUSE: {
    value: 4,
    desc: '拒绝出库'
  }
}

export enum ORDER_TYPE_ENUM {
  PROCUREMENT = 1,
  WITHDRAWAL
}
/*
 * 销售模块
 *
 */

export const RECEIVE_TYPE_ENUM: SmartEnum<number> = {
  CASH: {
    value: 1,
    desc: '现结'
  },
  ACCOUNT: {
    value: 2,
    desc: '欠款'
  },
  PAYMENT: {
    value: 3,
    desc: '预付款'
  },
  GIFT: {
    value: 4,
    desc: '0元赠'
  },
  DEPOSIT: {
    value: 5,
    desc: '押金'
  }
}

export const ORDER_STATRS_ENUM: SmartEnum<number> = {
  CASH: {
    value: 1,
    desc: '销售'
  },
  ACCOUNT: {
    value: 2,
    desc: '退货'
  },
  BARTER: {
    value: 3,
    desc: '换货'
  },
  GOODS: {
    value: 4,
    desc: '订货'
  },
  REFUND: {
    value: 5,
    desc: '订退'
  }
}

export const CHECK_FAIL_ENUM: SmartEnum<number> = {
  FAIL: {
    value: 1,
    desc: '未通过'
  },
  PASSED: {
    value: 2,
    desc: '已通过'
  }
}

export const PROGRESS_STATUS_ENUM: SmartEnum<number> = {
  PROGRESS: {
    value: 1,
    desc: '待审核'
  },
  COMPLETED: {
    value: 2,
    desc: '待出库'
  },
  CANCELLED: {
    value: 3,
    desc: '待签收'
  },
  FAIL: {
    value: 4,
    desc: '已完成'
  },
  PASSED: {
    value: 5,
    desc: '已取消'
  },
  PENDING_RETURN: {
    desc: '待回库',
    value: 6
  },
  PENDING_REJECTED: {
    desc: '已拒签',
    value: 7
  }
}
// 车退
export const PROGRESS_STA_ENUM: SmartEnum<number> = {
  // PROGRESS: {
  //   value: 1,
  //   desc: '待审核'
  // },
  // COMPLETED: {
  //   value: 2,
  //   desc: '待出库'
  // },
  CANCELLED: {
    value: 3,
    desc: '待签收'
  },
  FAIL: {
    value: 4,
    desc: '已完成'
  },
  PASSED: {
    value: 5,
    desc: '已取消'
  },
  PENDING_RETURN: {
    desc: '待回库',
    value: 6
  }
}

// 退货
export const PROGRESS_TUHO_ENUM: SmartEnum<number> = {
  PROGRESS: {
    value: 1,
    desc: '待审核'
  },
  // COMPLETED: {
  //   value: 2,
  //   desc: '待出库'
  // },
  CANCELLED: {
    value: 3,
    desc: '待签收'
  },
  FAIL: {
    value: 4,
    desc: '已完成'
  },
  PASSED: {
    value: 5,
    desc: '已取消'
  },
  PENDING_RETURN: {
    desc: '待回库',
    value: 6
  },
  PENDING_REJECTED: {
    desc: '已拒签',
    value: 7
  }
}

// 换货
export const PROGRESS_STABAR_ENUM: SmartEnum<number> = {
  COMPLETED: {
    value: 2,
    desc: '待出库'
  },
  CANCELLED: {
    value: 3,
    desc: '待签收'
  },
  FAIL: {
    value: 4,
    desc: '已完成'
  },
  PASSED: {
    value: 5,
    desc: '已取消'
  },
  PENDING_REJECTED: {
    desc: '已拒签',
    value: 7
  }
}

export const PROGRESS_RETURN_ENUM: SmartEnum<number> = {
  COMPLETED: {
    value: 2,
    desc: '待出库'
  },
  CANCELLED: {
    value: 3,
    desc: '待签收'
  },
  FAIL: {
    value: 4,
    desc: '已完成'
  },
  PASSED: {
    value: 5,
    desc: '已取消'
  },
  PENDING_RETURN: {
    desc: '待回库',
    value: 6
  }
}

export const ORDER_CHANNEL_ENUM: SmartEnum<number> = {
  BACKEND: {
    value: 1,
    desc: '后台下单'
  },
  SALESMAN: {
    value: 2,
    desc: '业务下单'
  },
  SYNCHRONOUS: {
    value: 3,
    desc: '同步订单'
  }
}

export const GOODS_TYPE_ENUM: SmartEnum<number> = {
  MELT: {
    value: 1,
    desc: '销'
  },
  GIVE: {
    value: 2,
    desc: '赠'
  },
  REFUND: {
    value: 3,
    desc: '退'
  },
  CHANGE: {
    value: 4,
    desc: '换'
  },
  BOOK: {
    value: 5,
    desc: '订'
  },
  BOOKREFUND: {
    value: 6,
    desc: '订退'
  }
}
/*
 * 销售单
 *
 */
export const UNSETYLED_TYPE_ENUM: SmartEnum<number> = {
  UNSETYLED: {
    value: 1,
    desc: '系统开单'
  },
  ALREADY: {
    value: 2,
    desc: '移动端开单'
  },
  PARTIAL: {
    value: 3,
    desc: '同步订单'
  },
  STORE: {
    value: 4,
    desc: '门店开单'
  }
}

export const UNSETYLED_TWO_ENUM: SmartEnum<number> = {
  UNSETYLED: {
    value: 1,
    desc: '系统开单'
  },
  ALREADY: {
    value: 2,
    desc: '移动端开单'
  },
  PARTIAL: {
    value: 3,
    desc: '同步订单'
  }
}

export const IS_SELF: SmartEnum<number> = {
  UNSHIPPED: {
    value: 0,
    desc: '统配'
  },
  OUTOF: {
    value: 1,
    desc: '自提'
  }
}

export const UNSHIPPED_TYPE_ENUM: SmartEnum<number> = {
  UNSHIPPED: {
    value: 0,
    desc: '否'
  },
  OUTOF: {
    value: 1,
    desc: '是'
  }
}

export const UNSETYLED_TY_ENUM: SmartEnum<number> = {
  DELIVERED: {
    value: 1,
    desc: '待调度'
  },
  DELIVERY: {
    value: 2,
    desc: '待签收'
  },
  EXCEPTION: {
    value: 3,
    desc: '已签收'
  },
  REJECTED: {
    value: 4,
    desc: '已拒签'
  }
}

export const DELIVERY_TYPE_ENUM: SmartEnum<number> = {
  DELIVERED: {
    value: 1,
    desc: '待配送'
  },
  DELIVERY: {
    value: 2,
    desc: '配送中'
  },
  EXCEPTION: {
    value: 3,
    desc: '配送异常'
  },
  COMPLETED: {
    value: 4,
    desc: '配送完成'
  }
}
/*
 * 商品列表
 *
 */
export const CATEGORY_TYPE_ENUM: SmartEnum<number> = {
  GOODS: {
    value: 1,
    desc: '商品'
  },
  DEMO: {
    value: 2,
    desc: '演示分类'
  }
}
export const GOODS_STATUS_ENUM: SmartEnum<number> = {
  APPOINTMENT: {
    value: 1,
    desc: '预约中'
  },
  SELL: {
    value: 2,
    desc: '售卖中'
  },
  SELL_OUT: {
    value: 3,
    desc: '售罄'
  }
}

// 欠款结算状态
export const SETTLEMENT_STATUS: SmartEnum<number> = {
  UNSETTLED: {
    value: 1,
    desc: '未结算'
  },
  SETTLED: {
    value: 2,
    desc: '已结算'
  }
}
//智能销售报表
// 1待调度 2待签收 3已签收 4已拒收 5取消(列表)
export const SMART_SIGN_ENUM: SmartEnum<number> = {
  DELIVERED: {
    value: 1,
    desc: '待调度'
  },
  WAIT_SIGN: {
    value: 2,
    desc: '待签收'
  },
  SIGN: {
    value: 3,
    desc: '已签收'
  },
  REJECTED: {
    value: 4,
    desc: '已拒签'
  },
  CANCELLED: {
    value: 5,
    desc: '已取消'
  }
}
// 筛选签收状态 1未签收 2正常签收 3异常签收 4拒绝签收
export const LIMIT_STATRS_ENUM: SmartEnum<number> = {
  UN_SIGN: {
    value: 1,
    desc: '未签收'
  },
  NORMAL_SIGN: {
    value: 2,
    desc: '正常签收'
  },
  EXCEPTION_SIGN: {
    value: 3,
    desc: '异常签收'
  },
  REJECT_SIGN: {
    value: 4,
    desc: '拒绝签收'
  }
}
export default {
  UNSETYLED_TYPE_ENUM,
  UNSHIPPED_TYPE_ENUM,
  DELIVERY_TYPE_ENUM,
  RECEIVE_TYPE_ENUM,
  CHECK_FAIL_ENUM,
  PROGRESS_STATUS_ENUM,
  PROGRESS_RETURN_ENUM,
  ORDER_CHANNEL_ENUM,
  GOODS_TYPE_ENUM,
  APPROVAL_STA_ENUM,
  APPROVAL_RETURN_ENUM,
  GOODS_STATUS_ENUM,
  CATEGORY_TYPE_ENUM,
  ORDER_STATRS_ENUM,
  UNSETYLED_TY_ENUM,
  PROGRESS_STA_ENUM,
  PROGRESS_STABAR_ENUM,
  PROGRESS_TUHO_ENUM,
  SETTLEMENT_STATUS,
  SMART_SIGN_ENUM,
  LIMIT_STATRS_ENUM,
  IS_SELF,
  UNSETYLED_TWO_ENUM
}
